<script type="text/javascript">
{literal}
$(document).ready(function() {
	$('#usernameBox').focus();
	$('#loginButton').attr('href', '');
	//add support select language
	$('#language_m').change(function () {
		window.location.href="SelectLanguage?lang=" + $(this).val() + '&ac=' + window.location.href;			
	});
	//end

});
{/literal}	

</script>

<form name="login" method="post" action="{$TOP_ACTION}">
	<input type="hidden" name="department" size="15" id="department">

	<div class='login_top' style='text-align: left'>
		<div class='login_bottom' style='height: 160px'>
			<div id='loginContainer'>
				<span id="errorMsg" style="color: red; display: none; margin-left: 30px;">&nbsp;</span>
		
				<div>
					<div  style='margin-bottom: 0px;'>
						{if $error}
							{$error}
						{/if}
					</div>
					<div style='margin-left: 40px;'>
						<label for='language_m'>{translate}Language{/translate}</label>
						<select name="language" id='language_m' selected='{$chosenLanguage}' style='width: 202px'>
							{html_options options=$languageList selected=$chosenLanguage}
						</select>
					</div>
					<div style='margin-left: 40px;'>
						<label for='usernameBox'>{translate}Username{/translate}&nbsp;</label>
						<input type="text" name="username" style='width: 200px' value="{$username}" id="usernameBox">
					</div>
					<div style='margin-left: 40px;'>
						<label for='passwordBox'>{translate}Password{/translate}&nbsp;</label>
						<input type="password" name="password" style='width: 200px' id='passwordBox'>
					</div>
					<div style='text-align: center; margin-top: 20px;'>
						<button type="submit" name="submit">{translate}Login{/translate}</button>
					</div>
				</div>
				<input type="hidden" name="process" value="{$PROCESS}">
			</div>
		</div>
	</div>
</form>